home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Vk
/
VkModel.z
/
VkModel
Wrap
Text File
|
1998-10-20
|
5KB
|
133 lines
VVVVkkkkMMMMooooddddeeeellll((((3333xxxx)))) VVVVkkkkMMMMooooddddeeeellll((((3333xxxx))))
NNNNAAAAMMMMEEEE
VkModel - An abstract class that supports Model-View-Controller style
applications
IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
VkCallbackObject
HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
#include <Vk/VkModel.h>
PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
DDDDeeeessssttttrrrruuuuccccttttoooorrrr
virtual void ~VkModel(void);
PPPPRRRROOOOTTTTEEEECCCCTTTTEEEEDDDD PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
VkModel(void);
NNNNoooottttiiiiffffyyyyiiiinnnngggg VVVViiiieeeewwwwssss ooooffff CCCChhhhaaaannnnggggeeeessss
void updateViews(void *data);
CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The VkModel class is a very simple abstract class that supports
applications that want to use the Model-View-Controller (MVC)
architecture. The VkModel class is intended to be subclassed, and the
subclass provides the data members and any additional functions required
to implement the model. ViewKit components can be used as both "views"
and "controllers". View components can arrange to be notified of changes
to the model by registering a member function with the
VkModel::updateCallback list. Callbacks on this list are invoked when a
subclass of VkModel calls _u_p_d_a_t_e_V_i_e_w_s(). This method is just a convenient
way to invoke the functions on the updateCallback list. Components used
as "controllers" are expected to send messages to subclasses of VkModel
to alter the state of the model. This protocol must be worked out between
the VkModel subclass and the controller components.
FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
uuuuppppddddaaaatttteeeeVVVViiiieeeewwwwssss(((())))
void updateViews(void * data);
Calls all member functions on the updateCallback list, passing the
provided data as the callData.
VVVVkkkkMMMMooooddddeeeellll(((())))
VkModel(void);
PPPPaaaaggggeeee 1111
VVVVkkkkMMMMooooddddeeeellll((((3333xxxx)))) VVVVkkkkMMMMooooddddeeeellll((((3333xxxx))))
Initialize a VkModel class.
~~~~VVVVkkkkMMMMooooddddeeeellll(((())))
virtual void ~VkModel(void);
Empty function.
DDDDAAAATTTTAAAA MMMMEEEEMMMMBBBBEEEERRRR DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
uuuuppppddddaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk
static const const char* updateCallback;
Other classes that wish to be notified when the internal state of a
VkModel subclass has changed should register a member function with
this callback list.
IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()
SSSSEEEEEEEE AAAALLLLSSSSOOOO
VkCallbackObject
_V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
_T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
_T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
_T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
PPPPaaaaggggeeee 2222